<%-- 
    Document   : listarEjerPorTema
    Created on : 02-mar-2012, 18:37:00
    Author     : Tarde
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>


<h2>LISTADO EJERCICIOS POR TEMAS</h2>

<c:choose>

    <c:when test="${!empty ejerlist}">
            <div class="accordion" id="accordion2">
        <logic:iterate  name="ejerlist"  id="ej" indexId="pos">

            <c:choose>

                <c:when test="${pos%2==0}">
                    <div style="background-color: #C5AF75"></div>
                </c:when>
                <c:otherwise>
                    <div style="background-color: #DAD085"></div>
                </c:otherwise>

            </c:choose>

                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse_${pos}">
                            ${ej.titulo}
                        </a>
                    </div>
                    <div id="collapse_${pos}" class="accordion-body collapse">
                        <div class="accordion-inner">
                            ${ej.descripcion}</br><br/>
                            <ul class="nav nav-pills">
                                <li class="active">
                                    <html:link action="selectExercToResolve.do?idej=${ej.idejercicio}">                            
                                        Seleccionar ejercicio
                                    </html:link></br>
                                </li>
                                <li class="active"><html:link href="ListCommentsUser.do?idej=${ej.idejercicio}">
                                        Mostrar Comentarios
                                    </html:link></br></li>
                                <li class="active"><html:link href="reportarejercicio.do?idEjercicio=${ej.idejercicio}">Reportar</html:link></li>
                            </ul>
                        </div>
                    </div>
                </div>
         
        </logic:iterate>
   </div>
    </c:when>

    <c:otherwise>

        <p><bean:message key="noEjerciciosEnTema.txt"></bean:message> </p>

    </c:otherwise>  

</c:choose>               
